package cn.cy.structure.bridge.pattern;

/**
 * @author yangxq
 * @desc
 * @date 2025-05-12
 */
public class PatternClient {

    public static void main(String[] args) {
        Device samsungTV = new TV("Samsung");
        Device sonySoundSystem = new SoundSystem("Sony");

        RemoteControl remoteControlTV = new AdvancedRemoteControl(samsungTV);
        remoteControlTV.controlDevice(); // 控制TV

        RemoteControl remoteControlSound = new AdvancedRemoteControl(sonySoundSystem);
        remoteControlSound.controlDevice(); // 控制音响

        // 可以轻松添加新设备
        Device newDevice = new TV("LG");
        RemoteControl newRemoteControl = new AdvancedRemoteControl(newDevice);
        newRemoteControl.controlDevice();
    }

}
